<%--
  Created by IntelliJ IDEA.
  User: chuHa
  Date: 2017/12/5
  Time: 9:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--初始化对话框--%>
<script>
    $('#dict_dialog [name="sn"]').textbox({
        width: 250,
    });
    $('#dict_dialog [name="name"]').textbox({
        width: 250,
    });
    $('#dict_dialog [name="text"]').textbox({
        height: 50,
        width: 250,
        multiline: true,
        prompt: '在此处输入简介......'
    });
</script>
<html>
<head>
    <title>数据字典</title>
    <jsp:include page="../common/common.jsp"></jsp:include>
    <script type="text/javascript" src="/static/js/system/dictionary.js"></script>
    <style>
        .boxWidth{
            width: 300px !important;
        }
    </style>
    <script>
        $(function () {
            $(".textbox-prompt").addClass("boxWidth");
        })
    </script>
</head>
<body class="easyui-layout">
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center'">
        <div id="dictWord">
            <div id="ft" style="padding:2px 5px;">
                <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" data-cmd="add"></a>
                <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" data-cmd="delete"></a>
                <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" data-cmd="edit"></a>
                <a href="#" class="easyui-linkbutton" iconCls="icon-reload" plain="true" data-cmd="reload"></a>
            </div>
        </div>
    </div>
    <div id="right_panel" data-options="region:'east',collapsed:false" style="width:250px">
        <div id="dictMenu"></div>
    </div>

    <div id="sub_menu" class="easyui-menu" style="width:120px;" onclick="menuHandler">
        <div data-options="iconCls:'icon-edit'" data-cmd="edit">编辑</div>
        <div data-options="iconCls:'icon-cancel'" data-cmd="delete">删除</div>
        <div data-options="iconCls:'icon-add'" data-cmd="add">新增</div>
        <div class="menu-sep"></div>
        <div data-options="iconCls:'icon-reload'" data-cmd="reload">刷新</div>
        <div>离开</div>
    </div>
    <script>
        function menuHandler(item) {
            var cmd = $(this).data('cmd');
            object[cmd]();
        }
    </script>

    <div id="dict_dialog">
        <form id="dict_form" method="post" style="margin-top: 20px">
            <table style="margin: 0 auto">
                <input type="hidden" name="id">
                <tr>
                    <td><input label="代码" type="text" class="easyui-textbox" name="sn" style="width: 250px;"></td>
                </tr>
                <tr>
                    <td><input label="名称" type="text" class="easyui-textbox" name="name" style="width: 250px;"></td>
                </tr>
                <tr id="dict_menu">
                    <td><input label="分类" type="text" class="easyui-combobox" name="parentId" panelHeight="auto"
                               data-options="valueField:'id',textField:'name',url:'/dictionary/queryMenu.do'"
                                style="width: 250px;" ></td>
                </tr>
                <tr>
                <td><input label="描述" type="text" class="easyui-textbox" name="text" style="width: 250px;"></td>
            </tr>
                <tr>
                </tr>
            </table>
        </form>
        <div id="dict_diaButtons">
            <a href="#" class="easyui-linkbutton" iconCls="icon-save" data-cmd="save">提交</a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" data-cmd="cancel">关闭</a>
        </div>
    </div>

</div>
</body>
</html>
